<?php


class Ext_View_Form_Admin_Base_Article extends Zend_Form
{

    public function init()
    {
        $bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');
        $bootstrap->bootstrap('view');
        $view = $bootstrap->getResource('view');
        $translate = Zend_Registry::get('Zend_Translate');
        
        $this->setAction($view->url(array('module'=>'admin', 'controller'=>'base', 'action'=>'save'),'default',true))
                ->setMethod('post')
                ->setAttrib('id', 'mainForm')
                ->setAttrib('name', 'mainForm')
                ->setDecorators(array(
                    'FormElements', array('HtmlTag', array('tag' => 'dl', 'class'=>'formUiB')),
                    'Form',
                  ))
                ->setTranslator($translate);
            ;
            
        $formElements = array();

        $formElement = new Zend_Form_Element_Radio('allowUploadImage');
        $formElement->setLabel('Allow upload image')
            ->addMultiOptions(array(
            '0' => 'disable',
            '1' => 'enable'
            ))
            ->setSeparator(' ');
        $formElements[] = $formElement;
        
        $formElement = new Zend_Form_Element_Radio('allowShareVideo');
        $formElement->setLabel('Allow share video')
            ->addMultiOptions(array(
            '0' => 'disable',
            '1' => 'enable'
            ))
            ->setSeparator(' ');
        $formElements[] = $formElement;
        
        $formElement = new Zend_Form_Element_Radio('allowShareMusic');
        $formElement->setLabel('Allow share music')
            ->addMultiOptions(array(
            '0' => 'disable',
            '1' => 'enable'
            ))
            ->setSeparator(' ');
        $formElements[] = $formElement;
        
        $formElement = new Zend_Form_Element_Radio('allowShareShopping');
        $formElement->setLabel('Allow share shopping')
            ->addMultiOptions(array(
            '0' => 'disable',
            '1' => 'enable'
            ))
            ->setSeparator(' ');
        $formElements[] = $formElement;
        
        $formElement = new Zend_Form_Element_Submit('submit');
        $formElement->setLabel("Submit");
        $formElements[] = $formElement;
        
        $this->addElements($formElements);
    }

}
